<?php
class ChannelAction extends Action
{
    public function index()
    {
        $id = $this->_get('id', null, 0);

        if ($id > 0) {
            $m = M('channel');
            $item = $m->where('id=' . $id)->find();

            $tpl_path = '';
            if (empty($item['tpl_list_theme'])){
                $tpl_path = TMPL_PATH . $item['tpl_content_theme'] . '/' . $item['tpl_content_path'];
            }
            else{
                $tpl_path = TMPL_PATH . $item['tpl_list_theme'] . '/' . $item['tpl_list_path'];
            }
            //$this->buildHtml('index', $item['en_title'].'/',$tpl_path);

            fb($tpl_path);
            $this->display($tpl_path);
        }
    }
}